#pragma once

#include <QtCore/QtGlobal>
#include "GUIWidget/GUIWidgetBase.h"


namespace EventOper 
{
	class ParaWidgetInterfaceOperator;
}

namespace Ui 
{
	class GUIDataInletWidget;
}

namespace Interface 
{
	class FITKCDDataInlet;
}


namespace GUI
{
	class MainWindow;
	class GUIWIDGETAPI GUIDataInletWidget : public GUIWidgetBase
	{
		Q_OBJECT
	public:
		GUIDataInletWidget(Interface::FITKCDDataInlet* obj, EventOper::ParaWidgetInterfaceOperator* oper, QWidget* parent = nullptr);
		~GUIDataInletWidget();

		void init();

    private slots:
		void on_lineEdit_Name_editingFinished();
		void on_comboBox_Inlet_Shape_activated(int index);
		void on_doubleSpinBox_Position0_valueChanged(double value);
		void on_doubleSpinBox_Position1_valueChanged(double value);
		void on_doubleSpinBox_Position2_valueChanged(double value);
		void on_doubleSpinBox_Flow_Rate0_valueChanged(double value);
		void on_doubleSpinBox_Flow_Rate1_valueChanged(double value);
		void on_doubleSpinBox_Flow_Rate2_valueChanged(double value);
		void on_doubleSpinBox_Inlet_Area_valueChanged(double value);

    private:
		void setDataToWidget();

    private:
        EventOper::ParaWidgetInterfaceOperator* _oper = nullptr;
		Ui::GUIDataInletWidget* _ui = nullptr;

		Interface::FITKCDDataInlet* _obj;
	};
}